<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>list 循环</title>
    <script src="../build/react.development.js"></script>
    <script src="../build/react-dom.development.js"></script>
    <script src="../build/babel.min.js"></script>
</head>
<body>
    <div id="app"></div>
    <div id="app1"></div>
    <script type="text/babel">     
        let list = ['凡金斯','jack','bob','小花'];
        let str = list.map((item,index)=>{
            return <h3>{item}-{index}</h3>
        })
        ReactDOM.render(str,document.getElementById('app'));
        ReactDOM.render(list,document.getElementById('app1'));
        // 上面代码体现了jsx基本规则语法：遇到html标签{以< 开头}，就用html规则解析；遇到代码块（以{ 开头）就已javascript解析
    </script>
</body>
</html>